/*
 * @Author: chenhuanhuan 2925102113@qq.com
 * @Date: 2024-12-17 10:45:59
 * @LastEditors: chenhuanhuan 2925102113@qq.com
 * @LastEditTime: 2024-12-18 16:16:40
 * @FilePath: \hbzc-groupmeal-center-web\src\api\Units.ts
 */
import request from "@/utils/newrequst";

//分页查询计量单位
export const getUnitsList = (data: any = {}) => {
  return request({
    url: `/base/v1/public/sku-packaging-unit/page`, method: "post", data: data,
  });
};


// 添加计量单位
export const addUnit = (data: any = {}) => {
  return request({
    url: `/base/v1/public/sku-packaging-unit/add`, method: "post", data: data,
  });
};
// 检查计量单位名称是否存在
export const checkUnitName = (data: any = {}) => {
  return request({
    url: `/base/v1/public/sku-packaging-unit/check-name-exist`, method: "post", data: data,
  });
};
// 删除计量单位
export const deleteUnit = (data: any = {}) => {
  return request({
    url: `/base/v1/public/sku-packaging-unit/delete`, method: "post", data: data,
  });
};
// 编辑计量单位
export const setUnit = (data: any = {}) => {
  return request({
    url: `/base/v1/public/sku-packaging-unit/edit`, method: "post", data: data,
  });
};

// 启用-停用状态
export const setUnitState = (data: any = {}) => {
  return request({
    url: `/base/v1/public/sku-packaging-unit/settings-enable-state`, method: "post", data: data,
  });
};